.yui3-g.bc.mtop30
	.yui3-u-17-24
		.border.radius8(style='height: 280px;')
			div(gf-slide, gf-slide-prev-next, gf-slide-auto-switch='true', interval=5000, ng-style='{width : "692px", height : "280px"}')
				//-div(gf-slide-item).tac
				//-	a(href='http://www.gf.com.cn/yykh/index.jsp')
				//-		img(src="./img/ad_first_1.jpg")
					//- map(name='ad_first_1')
						//- area(shape='rect',coords='410 50 590 160', title="预约", href='http://www.gf.com.cn/yykh/index.jsp', alt='预约')
						
				//-div(gf-slide-item)
				//-	a(href='http://www.gf.com.cn/business/businessIntro.html')
				//-		img(src="./img/banner.jpg", width=700, height: 290)
					
				div(gf-slide-item)
					a(href='#/fund/detail?pid=F_519898')
						img(src="./img/ad_fund_adv.jpg", width=700, height=290)
				div(gf-slide-item)
					a(href='/weixin/index.html', target='_blank')
						img(src="./img/ad_weixin.jpg", width=700, height=290)	
				div(gf-slide-item)
					a(href='#/service/detail?pid=303')
						img(src="./img/ad_first_3.jpg", width=700, height=290)

		
		.mtop30.yui3-g
			.yui3-u-1-2
				.border.radius8.pad20.mrem.functionContainer.goToRegister
					h2 我是新访客
					p.
						我是新访客，<a href='#/register', title='注册' class="link">我要注册</a>成为广发会员，体验广发服务！
				
			.yui3-u-1-2
				.border.radius8.pad20.functionContainer.goToCreateTradingAccount
					h2 预约开户
					p.
						我是新访问者，<a href='http://www.gf.com.cn/yykh/yuyue.jsp' class="link">我要开通</a>广发证券交易账户！
		.mtop30.border.radius8.pad20.functionContainer.goToTrading
			h2 我是老客户
			p.
				我是老客户，<a href='https://trade.gf.com.cn/' class="link">我要交易！</a>
				
		.mtop30.yui3-g
			.yui3-u-1-2
				.border.radius8.pad20.mrem.functionContainer.goToInvestment
					h2 我想投资
					p.
						我想投资，请给我推荐合适的<a href='#/fund' class="link">基金产品</a>！ 请给我推荐合适的<a href='#/asset' class="link">理财产品</a>！
				
			.yui3-u-1-2
				.border.radius8.pad20.functionContainer.goToService
					h2 选择服务产品
					p.
						我是广发证券客户，我要选择合适的<a href='#/service' class="link">服务产品</a>！
						
	.yui3-u-7-24
		.mlem
			.border.radius8(ng-switch='online').mbottom20
				.profile(ng-switch-when='true').pad20.top
					.clearfix
						img(src='img/man.jpg', height=92, width=92).pull-left.mbottom15
						ul.lines.hasimg
							li
								a(href='#/info/profile') 修改资料
							//-li
							//-	a(href='#/info') 修改图片
					
					ul.lines
						li
							| 您好：
							b {{session.display_name}}
							| ，欢迎回来
						li 客户经理：&nbsp;{{session.user.trade.khjl.ryxm}}
						li 所属营业部：&nbsp;{{session.user.trade.yybmc}}
					
					.yui3-g.mtop10
						a(href='http://www.gf.com.cn/bussinesshall/financingCzh.jsp', target='_blank').financing
						a(href='/#/info').myInfo
						//- a(href='#',onclick='return false;', ng-click='logout()').btn 安全退出
						
				div(ng-switch-default)		
					include ../include/loginform
			
			periodLabel = {1: '月',2: '季',3: '年'}
			.border.radius8.sellTops
				h2 销售排行
				ul.tab(ng-init="ranktab=0")
					li.yui3-u-1-3
						a.last(href='#', ng-class='{selectedItem: ranktab==0}', onclick='return false', ng-click="ranktab=0") 基金产品
					li.yui3-u-1-3
						a.last(href='#', ng-class='{selectedItem: ranktab==1}', onclick='return false', ng-click="ranktab=1") 理财产品
					li.yui3-u-1-3
						a(href='#', ng-class='{selectedItem: ranktab==2}', onclick='return false', ng-click="ranktab=2") 服务产品
				.content(ng-init='idx=0')
					riskLevelLabels = ['默认等级', '低','较低','中','较高','高'];
					fundRiskLevelLabels = ['默认等级', '低','较低','中','较高','高'];

					ul(ng-show='ranktab==0')
						each p,i in fund.items
							li(ng-mouseenter='idx=#{i}', ng-class='{selectedItem: idx==#{i}}')
								.icon
									img(src="/_cms_/sites/default/files/styles/product_icons/public/product_icons/fund.png", width=36, height=36);
								.info
									.mtop5
										unless p.offline || p.hot < 0
											a.buy(href='#', onclick='return false', ng-click="purchase('#{p.id}', #{(p.pricing && p.pricing[0] && p.pricing[0].period)||1}, #{p.extra.min_amount||1}, #{p.extra.charge_type||0})") 购买
										
										.indexIcon= i+1
										a.mlem.productionName(href='#/fund/detail?pid=#{p.id}')= p.title
									if p.pricing.length && p.pricing[0].period
										p.productionValue 净值：#{Number(p.pricing[0].period).toFixed(4)}
									else
										p.productionValue 净值：未知
									p.productionLevel 风险等级：#{fundRiskLevelLabels[p.risk_level]}

					ul(ng-show='ranktab==1')
						each p,i in asset.items
							li(ng-mouseenter='idx=#{i}', ng-class='{selectedItem: idx==#{i}}')
								.icon
									img(src="/_cms_/sites/default/files/styles/product_icons/public/product_icons/asset.png", width=36, height=36);
								.info
									.mtop5
										if p.extra2.buy_at_other_site
											a(href=p.extra2.buy_at_other_site, target='_blank') 购买
										else if p.extra2.latest_info && (p.extra2.latest_info.status=='0' || p.extra2.latest_info.status=='1')
											a.buy(href='#', onclick='return false', ng-click="purchase('#{p.id}', 0, 1000, #{p.extra2.latest_info.charge_type})") 购买
									
										.indexIcon= i+1
										a.mlem.productionName(href='#/asset/detail?pid=#{p.id}')= p.title
									p.productionValue 净值：#{Number(p.extra2.latest_netval[0].product_net_value).toFixed(4)}
									p.productionLevel 风险等级：#{fundRiskLevelLabels[p.risk_level]}

					ul(ng-show='ranktab==2')
						each p,i in service.items
							li(ng-mouseenter='idx=#{i}', ng-class='{selectedItem: idx==#{i}}')
								.icon
									img(src="/_cms_/sites/default/files/styles/product_icons/public/product_icons/#{p.id}.png", width=36, height=36);
								.info
									.mtop5
										unless p.offline || p.hot < 0
											a.buy(href='#', onclick='return false', ng-click="purchase('#{p.id}', #{p.pricing[0].period||1}, #{p.extra.min_amount||1}, #{p.extra.charge_type||0})") 购买
										
										.indexIcon= i+1
										a.mlem.productionName(href='#/service/detail?pid=#{p.id}')= p.title
									p.productionValue 产品价格：#{p.pricing[0].price}元/#{periodLabel[p.pricing[0].period]}
									p.productionLevel 风险等级：#{riskLevelLabels[p.risk_level]}
					
				
			.mtop20.border.radius8.recommendProductionTops
				h2 产品推荐
				ul
					each h,i in hot.items.slice(0, 4)
						li
							.icon
								if h.product_type == 'service'
									img(src="/_cms_/sites/default/files/styles/product_icons/public/product_icons/#{h.id}.png", width=36, height=36);
								else if h.product_type == 'fund'
									img(src="/_cms_/sites/default/files/styles/product_icons/public/product_icons/fund.png", width=36, height=36);
								else
									img(src="/_cms_/sites/default/files/styles/product_icons/public/product_icons/asset.png", width=36, height=36);
							.info
								unless h.offline||h.hot<0
									a.buy(href='#', onclick="return false",
											ng-click="purchase('#{h.id}', #{(h.pricing && h.pricing[0] && h.pricing[0].period)||1}, #{h.extra.min_amount||1}, #{h.extra.charge_type||0})") 购买

								a.nfc(href='#/#{h.product_type}/detail?pid=#{h.id}', title='#{h.title}')= h.title
								br
								if h.product_type == 'service'
									span.afc ￥#{h.pricing[0].price}元/#{periodLabel[h.pricing[0].period]}
								else if h.product_type == 'fund'
									if h.pricing.length && h.pricing[0].period
										span.afc 净值：#{Number(h.pricing[0].period).toFixed(4)}
									else
										span.afc 净值：未知
								else
									span.afc 净值：#{Number(h.extra2.latest_netval[0].product_net_value).toFixed(4)}